fix(buzz-acp): suppress agent console window on Windows (CREATE_NO_WINDOW)#2416
Open
philpof102-svg wants to merge 2 commits into
Open
fix(buzz-acp): suppress agent console window on Windows (CREATE_NO_WINDOW)#2416philpof102-svg wants to merge 2 commits into
philpof102-svg wants to merge 2 commits into
Conversation
…NDOW) The desktop spawns buzz-acp with CREATE_NO_WINDOW (managed_agents/runtime.rs), so the harness has no console to share. AcpClient::spawn launched the agent subprocess without the flag, so every console-subsystem agent child on Windows — the `claude-agent-acp`/ `goose` cmd shim, node, `claude.exe` — got a fresh visible console window that lingered. External adapters (Claude Code) hit this; the GUI-subsystem bundled `buzz-agent` did not. Mirror the desktop's suppression at the harness spawn: set CREATE_NO_WINDOW on Windows, alongside the existing #[cfg(unix)] process_group(0). stdio pipes are unaffected. Signed-off-by: Philippe <philpof97@gmail.com> Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Author
|
Added a second commit: the same CREATE_NO_WINDOW gap exists in |
…E_NO_WINDOW) Same systemic gap as the buzz-acp fix, in the sibling harness: buzz-agent is spawned by the desktop with CREATE_NO_WINDOW (managed_agents/runtime.rs), so it has no console to share. But spawn_one() in mcp.rs launches each MCP server subprocess without that flag, so every console-subsystem MCP server child on Windows — a `node` stdio server, a cmd shim — gets a fresh visible console window that lingers. This hits any node-based MCP server added to a buzz-agent. Mirror the desktop's suppression at the MCP spawn, alongside the existing #[cfg(unix)] process_group(0). tokio::process::Command::creation_flags is inherent on Windows. Signed-off-by: Philippe <philpof97@gmail.com> Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
On Windows, an external ACP agent runtime (e.g. the Claude Code adapter) pops a fresh, lingering console window for every agent subprocess. This makes
buzz-acpon Windows visually broken when the agent isn't the bundledbuzz-agent.Root cause
The desktop already spawns the harness with
CREATE_NO_WINDOW—desktop/src-tauri/src/managed_agents/runtime.rssets it, with a comment noting "Without this a bare terminal pops for buzz-acp.exe and lingers". Sobuzz-acpruns with no console of its own.But
AcpClient::spawn(crates/buzz-acp/src/acp.rs) launches the agent subprocess without that flag (only#[cfg(unix)] process_group(0)is set). Because the parent has no console to share, Windows allocates a new visible console for each console-subsystem agent child — theclaude-agent-acp/goosecmd shim,node,claude.exe. External adapters (Claude Code runtime) hit this; the GUI-subsystem bundledbuzz-agentdoes not, which is why it only shows up with external runtimes.Fix
Mirror the desktop's suppression at the harness spawn: set
CREATE_NO_WINDOWon Windows inAcpClient::spawn, alongside the existing#[cfg(unix)] process_group(0).tokio::process::Command::creation_flagsis inherent on Windows. stdio pipes are unaffected.Repro
Windows, Buzz 0.4.22, deploy an agent using the Claude Code runtime → a console window pops (per agent child) and lingers. With
buzz-agent(GUI subsystem) it does not.Testing
Change is a 6-line
#[cfg(windows)]addition mirroring code already present in the desktop crate. Full disclosure: I could not run a local Windows build to exercise it end-to-end (my machine has no MSVC linker installed), so I'm relying on the review + CI here rather than claiming a local run. Happy to adjust placement/style.